/*
 * Copyright (C) 2008 LianHaidong <lianhaidong@gmail.com>
 */

#ifndef _UTIL_DEBUG_H
#define _UTIL_DEBUG_H
#include <stdio.h>

#define msg(fmt, arg...) do {	\
	fprintf(stdout, fmt, ##arg);	\
	fprintf(stdout, " --->File = %s, Line = %d, Func = %s\n", __FILE__, __LINE__, __func__);	\
	fflush(stdout);	\
} while (0)


#ifdef DEBUG
#define debug(fmt, arg...) msg(fmt, ##arg)
#else
#define debug(fmt, arg...)
#endif


#endif	/* _UTIL_DEBUG_H */
